fix(sdk): use case-insensitive comparison for Azure VM backup checks#10395
fix(sdk): use case-insensitive comparison for Azure VM backup checks#10395HugoPBrito merged 6 commits intomasterfrom
Conversation
- Compare VM names with .lower() in vm_backup_enabled and vm_sufficient_daily_backup_retention_period - Add tests to verify case-insensitive matching between VM names and backup item names - Update SDK changelog
|
✅ All necessary |
|
✅ Conflict Markers Resolved All conflict markers have been successfully resolved in this pull request. |
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #10395 +/- ##
==========================================
- Coverage 93.37% 86.12% -7.25%
==========================================
Files 219 223 +4
Lines 30426 5743 -24683
==========================================
- Hits 28409 4946 -23463
+ Misses 2017 797 -1220
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
🔒 Container Security ScanImage: 📊 Vulnerability Summary
4 package(s) affected
|
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
Context
Fix #10372
Azure sometimes stores VM names in the Recovery Services vault with different casing than the VM resource name itself (e.g.,
VMTESTin vault vsvmtestin VM). This causes false negatives where a VM is flagged as not backed up even though it is protected. This is a known Azure behavior.Description
.lower()) when matching VM names against backup item names invm_backup_enabledandvm_sufficient_daily_backup_retention_periodchecksSteps to review
.lower()comparison change in both check filestest_vm_protected_by_backup_case_insensitiveandtest_vm_with_sufficient_retention_case_insensitiveChecklist
Community Checklist
SDK/CLI
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.